export default {
    name: 'Abnormaldevice',
    components: {

    },
    data() {
        return {
            currentTab: '/Abnormallist',
            showPage: '/Abnormallist',
            tabList: [
                {
                    action: '/Abnormallist',
                    name: '报表模式'
                },
                {
                    action: '/Abnormalmap',
                    name: '地图模式'
                }
            ]
        }
    },
    computed: {

    },
    watch: {
        currentTab(newVal, oldVal) {
            this.$router.push({
                path: newVal
            });
        },
        $route: {
            handler(val, oldVal) {
                if (val.path == '/abnormaldevice') {
                    this.routeAgain();
                }
            }
        }
    },
    created() {
        this.routeAgain();
        this.$router.push({
            path: this.showPage,
        });
    },
    mounted() {

    },
    methods: {
        routeAgain() {
            this.$router.push({
                path: '/Abnormallist'
            })
        }
    },
}